-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
CLN: Move rolling helper functions to where they are used #34269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLN: Move rolling helper functions to where they are used #34269
Conversation
pandas/core/window/rolling.py
Outdated
@@ -59,6 +56,81 @@ | |||
from pandas.tseries.offsets import DateOffset | |||
|
|||
|
|||
def calculate_center_offset(window) -> int: | |||
""" | |||
Calculates an offset necessary to have the window label to be centered |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to be pedantic :) But should this follow the docstring guide?
The short summary must start with a capital letter, end with a dot, and fit in a single line. It needs to express what the object does without providing details. For functions and methods, the short summary must start with an infinitive verb.
same for the calculate_min_periods
docstring
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. happy to have you de-privatize things if needed (e.g. get_center_of_mass) and/or improve doc-strings. just give a quick pass if you can. ping on green.
Thanks @mroeschke |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
Added some docstrings as well